package org.indp.mongowl.services;

import com.mongodb.DB;
import com.mongodb.MongoClient;
import org.indp.mongowl.model.ConnectionProfile;

/**
 *
 */
public class ServerConnection {

    private final ConnectionProfile connectionProfile;
    private final MongoClient mongoClient;

    public ServerConnection(ConnectionProfile connectionProfile, MongoClient mongoClient) {
        this.connectionProfile = connectionProfile;
        this.mongoClient = mongoClient;
    }

    public ConnectionProfile getConnectionProfile() {
        return connectionProfile;
    }

    public MongoClient getMongoClient() {
        return mongoClient;
    }

    public DB getDatabase(String name) {
        return getMongoClient().getDB(name);
    }
}
